package crm.util;

import java.util.*;
import java.text.*;
public class DateTime {
	//获取当前日期
	public static String DateTime(){
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
		Date currentTime = new Date();
		String str_date1 = formatter.format(currentTime); 
		String str_date2 = str_date1.toString();
		return str_date2;
	}
	
	public static String Date(){
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); 
		Date currentTime = new Date();
		String str_date1 = formatter.format(currentTime); 
		String str_date2 = str_date1.toString();
		return str_date2;
	}
	
	public static void main(String args[]) {
		System.out.println(Date());
		System.out.println(Integer.parseInt(Date().replace("-", "").trim()));
	}
	
}
